package uy.com.tsi2G7.superbet.event;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.ejb.Local;
import javax.ejb.ObjectNotFoundException;

import uy.com.tsi2G7.superbet.event.dao.ObjectAlreadyExistsException;

@Local
public interface EventService {

	public Map<EventMarket,List<EventMarketResult>> getCurrentMarkets(Long eventId,Long eventTypeId);

	public List<EventMarketResult> getMarketResults(long eventTypeId,
			long marketId);

	public EventMarket getMarketById(long marketId);

	
	public void addMarketResult(long marketResultId, String marketResultName,
			long eventTypeId, long eventId, long marketId, BigDecimal amount)
			throws ObjectNotFoundException, ObjectAlreadyExistsException;

	public void addEvent(Long id, long eventId, String eventInputName)throws ObjectNotFoundException, ObjectAlreadyExistsException;

	public void addMarket(Long eventTypeId, Long eventId, String marketInputName,
			long marketId, Date marketDate) throws ObjectNotFoundException, ObjectAlreadyExistsException;

	public List<EventMarketResult> getMarketResultsById(List<Long> ids);

	public Map<EventMarket, List<EventMarketResult>> getMarketsWithPendingResults();

	public void setWinner(EventMarket market, long resultId);
	
	public List<Event> getAllEvents();
	
	public List<EventType> getAllEventTypes();
	
	public List<EventMarket> getCurrentMarketsByEventId(Long eventId, Long eventTypeId);
	
	
}
